package service;

import dao.purchaseMapper;
import entity.purchase;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AddPurchaseService {
    @Autowired
    private purchaseMapper purchaseMapper;

    public boolean addPurchase(purchase purchase) {
        int r = purchaseMapper.insert(purchase);
        if (r > 0) {
            return true;
        }
        return false;
    }
}
